package com.panfeng.xcloud.component.sms.enums;

import java.util.Arrays;

/**
 * 短信通道类型
 */
public enum SMSChannelTypeEnum {

    ALIYUN((byte) 1, "阿里云"),
    LANCHUANG((byte) 2, "蓝创");

    private Byte value;

    private String text;

    public static SMSChannelTypeEnum of(Byte value) {
        if (value != null) {
            for (SMSChannelTypeEnum s : values()) {
                if (s.value.equals(value)) {
                    return s;
                }
            }
        }
        return null;
    }


    public static boolean except(Byte value, SMSChannelTypeEnum... status) {
        return (status != null && status.length > 0) && Arrays.asList(status).contains(of(value));
    }


	private SMSChannelTypeEnum(Byte value, String text) {
		this.value = value;
		this.text = text;
	}


	public Byte getValue() {
		return value;
	}


	public void setValue(Byte value) {
		this.value = value;
	}


	public String getText() {
		return text;
	}


	public void setText(String text) {
		this.text = text;
	}

}
